package com.fucius.study.leetcode;

import java.util.*;

public class CountPoints {

    public int[] countPoints(int[][] points, int[][] queries) {
        int[] result = new int[queries.length];

        for(int i=0;i<queries.length;i++){
            int count = 0;
            for(int j=0;j<points.length;j++){
                if(contain(queries[i],points[j])){
                    count++;
                }
            }
            result[i] = count;
        }
        return result;
    }
    public boolean contain(int[] queries ,int[] ponit){
        int r2 = queries[2]*queries[2];
        int x2 = (queries[0]-ponit[0])*(queries[0]-ponit[0]);
        int y2 = (queries[1]-ponit[1])*(queries[1]-ponit[1]);
        if(x2+y2<=r2){
            return true;
        }
        return false;
    }

    public static void main(String[] args) {
        System.out.println(1^2);
    }
}
